<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="TOKN">﻿</span><span class="COMM">/*
<span class='line'>  2</span> Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
<span class='line'>  3</span> For licensing, see LICENSE.html or http://ckeditor.com/license
<span class='line'>  4</span> */</span><span class="WHIT">
<span class='line'>  5</span>
<span class='line'>  6</span> </span><span class="NAME">CKEDITOR.plugins.add</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'removeformat'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>  7</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>  8</span> </span><span class="WHIT">	</span><span class="NAME">requires</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="STRN">'selection'</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>  9</span>
<span class='line'> 10</span> </span><span class="WHIT">	</span><span class="NAME">init</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pluginPath</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 11</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 12</span> </span><span class="WHIT">		</span><span class="NAME">editor.addCommand</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'removeFormat'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.plugins.removeformat.commands.removeformat</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 13</span> </span><span class="WHIT">		</span><span class="NAME">editor.ui.addButton</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'RemoveFormat'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 14</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 15</span> </span><span class="WHIT">				</span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">editor.lang.removeFormat</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 16</span> </span><span class="WHIT">				</span><span class="NAME">command</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'removeFormat'</span><span class="WHIT">
<span class='line'> 17</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 18</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 19</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 20</span>
<span class='line'> 21</span> </span><span class="NAME">CKEDITOR.plugins.removeformat</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'> 22</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 23</span> </span><span class="WHIT">	</span><span class="NAME">commands</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">		</span><span class="NAME">removeformat</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="WHIT">			</span><span class="NAME">exec</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 28</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tagsRegex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editor._.removeFormatRegex</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="WHIT">					</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor._.removeFormatRegex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">RegExp</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'^(?:'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">editor.config.removeFormatTags.replace</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="REGX">/,/g</span><span class="PUNC">,</span><span class="STRN">'|'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">')$'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'i'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 31</span>
<span class='line'> 32</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">removeAttributes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editor._.removeAttributes</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">					</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">editor._.removeAttributes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editor.config.removeFormatAttributes.split</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">','</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 34</span>
<span class='line'> 35</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ranges</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">editor.getSelection</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getRanges</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 36</span>
<span class='line'> 37</span> </span><span class="WHIT">				</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">range</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">range</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ranges</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 39</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">range.collapsed</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="WHIT">						</span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 41</span>
<span class='line'> 42</span> </span><span class="WHIT">					</span><span class="NAME">range.enlarge</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.ENLARGE_ELEMENT</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 43</span>
<span class='line'> 44</span> </span><span class="WHIT">					</span><span class="COMM">// Bookmark the range so we can re-select it after processing.</span><span class="WHIT">
<span class='line'> 45</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bookmark</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">range.createBookmark</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 46</span>
<span class='line'> 47</span> </span><span class="WHIT">					</span><span class="COMM">// The style will be applied within the bookmark boundaries.</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">startNode</span><span class="WHIT">	</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">bookmark.startNode</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">endNode</span><span class="WHIT">		</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">bookmark.endNode</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 50</span>
<span class='line'> 51</span> </span><span class="WHIT">					</span><span class="COMM">// We need to check the selection boundaries (bookmark spans) to break</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="WHIT">					</span><span class="COMM">// the code in a way that we can properly remove partially selected nodes.</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT">					</span><span class="COMM">// For example, removing a &lt;b> style from</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT">					</span><span class="COMM">//		&lt;b>This is [some text&lt;/b> to show &lt;b>the] problem&lt;/b></span><span class="WHIT">
<span class='line'> 55</span> </span><span class="WHIT">					</span><span class="COMM">// ... where [ and ] represent the selection, must result:</span><span class="WHIT">
<span class='line'> 56</span> </span><span class="WHIT">					</span><span class="COMM">//		&lt;b>This is &lt;/b>[some text to show the]&lt;b> problem&lt;/b></span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT">					</span><span class="COMM">// The strategy is simple, we just break the partial nodes before the</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">					</span><span class="COMM">// removal logic, having something that could be represented this way:</span><span class="WHIT">
<span class='line'> 59</span> </span><span class="WHIT">					</span><span class="COMM">//		&lt;b>This is &lt;/b>[&lt;b>some text&lt;/b> to show &lt;b>the&lt;/b>]&lt;b> problem&lt;/b></span><span class="WHIT">
<span class='line'> 60</span>
<span class='line'> 61</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">breakParent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 63</span> </span><span class="WHIT">						</span><span class="COMM">// Let's start checking the start boundary.</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT">						</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">path</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.dom.elementPath</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">node</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">						</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">pathElements</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">path.elements</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 66</span>
<span class='line'> 67</span> </span><span class="WHIT">						</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">pathElement</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">pathElement</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pathElements</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">pathElement.equals</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">path.block</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">pathElement.equals</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">path.blockLimit</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">								</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 71</span>
<span class='line'> 72</span> </span><span class="WHIT">							</span><span class="COMM">// If this element can be removed (even partially).</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">tagsRegex.test</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">pathElement.getName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">								</span><span class="NAME">node.breakParent</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">pathElement</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 77</span>
<span class='line'> 78</span> </span><span class="WHIT">					</span><span class="NAME">breakParent</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">startNode</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">					</span><span class="NAME">breakParent</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">endNode</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 80</span>
<span class='line'> 81</span> </span><span class="WHIT">					</span><span class="COMM">// Navigate through all nodes between the bookmarks.</span><span class="WHIT">
<span class='line'> 82</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">currentNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">startNode.getNextSourceNode</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.NODE_ELEMENT</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 83</span>
<span class='line'> 84</span> </span><span class="WHIT">					</span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">currentNode</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">					</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">						</span><span class="COMM">// If we have reached the end of the selection, stop looping.</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">currentNode.equals</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">endNode</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="WHIT">							</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 89</span>
<span class='line'> 90</span> </span><span class="WHIT">						</span><span class="COMM">// Cache the next node to be processed. Do it now, because</span><span class="WHIT">
<span class='line'> 91</span> </span><span class="WHIT">						</span><span class="COMM">// currentNode may be removed.</span><span class="WHIT">
<span class='line'> 92</span> </span><span class="WHIT">						</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nextNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">currentNode.getNextSourceNode</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.NODE_ELEMENT</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 93</span>
<span class='line'> 94</span> </span><span class="WHIT">						</span><span class="COMM">// This node must not be a fake element.</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="WHIT">						</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">currentNode.getName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'img'</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">currentNode.getAttribute</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="STRN">'_cke_protected_html'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 96</span> </span><span class="WHIT">						</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">							</span><span class="COMM">// Remove elements nodes that match with this style rules.</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT">							</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">tagsRegex.test</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">currentNode.getName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT">								</span><span class="NAME">currentNode.remove</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">							</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">								</span><span class="NAME">currentNode.removeAttributes</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">removeAttributes</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">						</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>103</span>
<span class='line'>104</span> </span><span class="WHIT">						</span><span class="NAME">currentNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nextNode</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">					</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>106</span>
<span class='line'>107</span> </span><span class="WHIT">					</span><span class="NAME">range.moveToBookmark</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">bookmark</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>109</span>
<span class='line'>110</span> </span><span class="WHIT">				</span><span class="NAME">editor.getSelection</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">selectRanges</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">ranges</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>114</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>115</span>
<span class='line'>116</span> </span><span class="COMM">// Only inline elements are valid.</span><span class="WHIT">
<span class='line'>117</span> </span><span class="NAME">CKEDITOR.config.removeFormatTags</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>118</span>
<span class='line'>119</span> </span><span class="NAME">CKEDITOR.config.removeFormatAttributes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'class,style,lang,width,height,align,hspace,valign'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>120</span> </span></pre></body></html>
